home *** CD-ROM | disk | FTP | other *** search
/ PC User 2002 April / Disc 2 / PCUSER0402D2.iso / software / utils / files / wincron.exe / data1.cab / Sample_Scripts / logfile_test.tg < prev    next >
Encoding:
Text File  |  2001-10-20  |  1.0 KB  |  34 lines

  1. ## logfile_test.tg
  2. # demonstrate the log file facility.
  3. # Special thanks to a wincron user for sending in this interesting use of the
  4. # DATE MACROS for create a logfile name with meaning!
  5. # See Also: macro_test.tg & DATE MACROS in the documentation.
  6.  
  7. # logfile test
  8. {
  9.     -name logfile_main
  10.     -start
  11.     -stop 
  12.  
  13.     # first we create a logfile with a simple name
  14.     -action -logfile "%TG.ROOT_DIR%My Logfile.txt"
  15.  
  16.     # okay, send some text to the log
  17.     -action -print All this is going to the logfile!
  18.     -action -print find the results here: "%TG.ROOT_DIR%My Logfile.txt"
  19.     
  20.     # now for a log file that encodes the date/time in the name
  21.     # The format of the file name is: 
  22.     # %m% Month as decimal number (01-12) 
  23.     # %d% Day of month as decimal number (01-31) 
  24.     # %H% Hour in 24-hour format (00-23) 
  25.     # %M% Minute as decimal number (00-59) 
  26.     -action -logfile "%TG.ROOT_DIR%%m%%d%%H%%M%.txt"
  27.  
  28.     # okay, send some text to the log
  29.     -action -print All this is going to the logfile too!
  30.     -action -print find the results here: "%TG.ROOT_DIR%%m%%d%%H%%M%.txt"
  31. }
  32.  
  33.  
  34.